home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
daybat10.zip
/
DAYBAT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-02-08
|
2KB
|
80 lines
(*
* Runs a different batch file each day
*
* By Joseph Sheppard, The Ledge PCBoard (818) 352-3620
*
* Shareware Material
*)
{$M 16000,42000,42000}
{$L-}
{$V-}
program Newdoor;
uses
dos;
const
days: array[0..6] of string[3] =
('SUN','MON','TUE','WED','THU','FRI','SAT');
var
y,m,d,w: word;
bat: string;
(* ---------------------------------------------------------------- *)
procedure show_help;
begin
writeln;
writeln('DAYBAT will run a different batch file every day of the week.');
writeln('The Batch files must be named with the first three letters of the day');
writeln('of the week followed by .BAT (Example: MON.BAT, TUES.BAT, etc.). The');
writeln('batch files must be located in the DOS Path, or the same directory as');
Writeln('DAYBAT.EXE. Run DAYBAT in your AUTOEXEC.BAT to activate a new batch');
Writeln('file each day!');
writeln;
writeln('DAYBAT is released under the Shareware concept. If this program meets');
writeln('your needs, please send the author whatever you feel the program is worth.');
writeln('The suggested amount is $5.00. Send contributions to:');
writeln;
writeln(' Joseph Sheppard');
writeln(' PO Box 10');
writeln(' Tujunga, CA 91042-0010');
end;
(* ---------------------------------------------------------------- *)
procedure run_bat;
begin
writeln;
writeln('<DAYBAT ?> for instructions');
writeln;
writeln('Executing ',bat);
writeln;
exec(getenv('COMSPEC'),'/c'+ bat);
end;
(* ---------------------------------------------------------------- *)
begin
writeln;
writeln('DAYBAT V1.0 by Joseph Sheppard, The Ledge PCBoard (818) 352-3620 - HST');
GetDate(y,m,d,w);
bat:=days[w]+'.BAT';
if paramstr(1)='?' then show_help;
if paramstr(1)<>'?' then run_bat;
writeln;
end.